<form class="form-horizontal" method="post" action="http://<?php echo SELF;?>">

	<input type="hidden" name="action" value="modify_category_board" />
	<input type="hidden" name="idx" value="<?php echo $result['idx']?>" />
	<input type="hidden" name="id" value="<?php echo $result['id']?>" />

	<div class="btn-group" style="margin-bottom:10px">
		<a href="<?php echo $href?>/<?php echo $kong->id ?>/board/<?php echo $result['id']?>" class="btn">기본</a>
		<a href="<?php echo $href?>/<?php echo $kong->id ?>/board/<?php echo $result['id']?>/category" class="btn disabled">카테고리</a>
		<a href="<?php echo $href?>/<?php echo $kong->id ?>/board/<?php echo $result['id']?>/grant" class="btn">권한</a>
	</div>
	
	<table class="table table-striped">
		<thead>
			<tr>
				<th class="align-left">이름</th>
				<th style="width:150px;">설정</th>
			</tr>
		</thead>
		<tbody id="category_item">
<?php for ($i = 0; $i < count($rows); $i++) : ?>
			<tr data-row="<?php echo $i?>">
				<td class="align-left">
					<input type="hidden" name="category_idx[]" value="<?php echo $rows[$i]['idx'] ?>" />
					<input type="text" name="category_name[]" value="<?php echo $rows[$i]['name'] ?>" />
				</td>
				<td class="align-right">
					<div class="btn-group">
						<a type="button" class="btn btn-up"><i class="icon-angle-up"></i></a>
						<a type="button" class="btn btn-down"><i class="icon-angle-down"></i></a>
						<a type="button" class="btn btn-delete">삭제</a>
					</div>
				</td>
	
<?php endfor; ?>
		</tbody>
		<tfoot>
			<tr>
				<td colspan="2" class="align-right">
					<button type="submit" name="submit" id="submit" class="btn btn-warning">수정</button>
				</td>
			</tr>
		</tfoot>
	</table>
</form>

<form class="form-inline" method="post">
	
	<input type="hidden" name="action" value="new_category_board" />
	<input type="hidden" name="idx" value="<?php echo $result['idx']?>" />
	<input type="hidden" name="id" value="<?php echo $result['id']?>" />

	<input type="text" name="name" required="1" placeholder="Category Name" autofocus="1" />
	<button type="submit" name="submit" id="submit" class="btn">추가</button>

</form>
